<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<c:if test="${fn:length(attaStoreList) == 0}">
	<div data-options="iconCls:'icon-ok'" style="overflow:auto;padding-left:10px;">
			<h3 style="color:#0099FF;">暂没有检索到您上传的文件</h3>
			<p>&nbsp;&nbsp;&nbsp;&nbsp;用户您好,请您使用上边的"上传附件"按钮,选定需要上传到附件,且上传成功后,此处才会显示附件</p>
	</div>
</c:if>
<c:if test="${fn:length(attaStoreList) > 0}">
<div class="attadiv">
		<ul>
	<c:forEach items="${attaStoreList}" var="at">
			<li>
			<p><a href="${downloadUrl}atta/${at.downloadUrl}${at.sid}.${at.attachmentType}" target="_blank" title="${at.attachmentDesc}">
			<c:choose>
				<c:when test="${fn:indexOf('doc,DOC,docx,DOCX',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_doc.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('gif,GIF,png,PNG,jpg,JPG,icon,ICON',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_gif.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('txt,TXT',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_txt.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('xls,xlsx,XLS,XLSX',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_exl.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('ppt,pptx,PPT,PPTX',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_ppt.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('rar,zip,gz,tar,7z,jar,RAR,ZIP,GZ,TAR,7Z,JAR',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_rar.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('rm,rmvb,wmv,flv,mov,mp4,3gp,RM,RMVB,WMV,FLV,MOV,MP4,3GP',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_mov.gif"/>
			  	</c:when>
			  	<c:when test="${fn:indexOf('swf',at.attachmentType) != -1}">
			    	<img src="${ctx}/js/attachment/images/win/max/fu_swf.gif"/>
			  	</c:when>
			  	<c:otherwise>
			    	<img src="${ctx}/js/attachment/images/win/max/fu_file.gif"/>
			  	</c:otherwise>
			  </c:choose>
				</a>
			</p>
			<p class="name" title="${at.attachmentName}">${at.attachmentName}</p>
			<p class="tools">
				<a href="javascript:void(0);" onclick="delAttaStore('${at.sid}','${at.attachmentName}');">删除</a>
					|<a href="javascript:void(0);" onclick="updAttaStore('${at.sid}','${at.attachmentName}');">编辑</a>
			</p>
			</li>
	</c:forEach>
	<div class="cls"></div>
	</div>
</c:if>
